--
-- PostgreSQL database dump
--

-- Started on 2010-09-01 10:58:43

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 346 (class 2612 OID 16386)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: root
--

CREATE PROCEDURAL LANGUAGE plpgsql;


ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO root;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1550 (class 1259 OID 16782)
-- Dependencies: 3
-- Name: clientes; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE clientes (
    "codCliente" integer NOT NULL,
    nome text,
    cpf text,
    tamanho text,
    rua text,
    numero integer,
    bairro text,
    cidade text,
    telefone text,
    aniversario text,
    observacoes text,
    "UF" text,
    complemento text,
    "valorConta" double precision,
    cep text
);


ALTER TABLE public.clientes OWNER TO root;

--
-- TOC entry 1549 (class 1259 OID 16780)
-- Dependencies: 1550 3
-- Name: clientes_codCliente_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "clientes_codCliente_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."clientes_codCliente_seq" OWNER TO root;

--
-- TOC entry 1882 (class 0 OID 0)
-- Dependencies: 1549
-- Name: clientes_codCliente_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "clientes_codCliente_seq" OWNED BY clientes."codCliente";


--
-- TOC entry 1883 (class 0 OID 0)
-- Dependencies: 1549
-- Name: clientes_codCliente_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"clientes_codCliente_seq"', 1, true);


--
-- TOC entry 1543 (class 1259 OID 16711)
-- Dependencies: 3
-- Name: compras; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE compras (
    "codCompra" integer NOT NULL,
    "codFuncionario" integer,
    data text,
    total double precision,
    "tipoPagamento" text
);


ALTER TABLE public.compras OWNER TO root;

--
-- TOC entry 1542 (class 1259 OID 16709)
-- Dependencies: 1543 3
-- Name: compras_codCompra_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "compras_codCompra_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."compras_codCompra_seq" OWNER TO root;

--
-- TOC entry 1884 (class 0 OID 0)
-- Dependencies: 1542
-- Name: compras_codCompra_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "compras_codCompra_seq" OWNED BY compras."codCompra";


--
-- TOC entry 1885 (class 0 OID 0)
-- Dependencies: 1542
-- Name: compras_codCompra_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"compras_codCompra_seq"', 1, false);


--
-- TOC entry 1553 (class 1259 OID 16860)
-- Dependencies: 3
-- Name: contasPagar; Type: TABLE; Schema: public; Owner: alcivando; Tablespace: 
--

CREATE TABLE "contasPagar" (
    "codContaPagar" integer NOT NULL,
    "codCompra" integer
);


ALTER TABLE public."contasPagar" OWNER TO alcivando;

--
-- TOC entry 1555 (class 1259 OID 16866)
-- Dependencies: 1553 3
-- Name: contasPagar_codContaPagar_seq; Type: SEQUENCE; Schema: public; Owner: alcivando
--

CREATE SEQUENCE "contasPagar_codContaPagar_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."contasPagar_codContaPagar_seq" OWNER TO alcivando;

--
-- TOC entry 1886 (class 0 OID 0)
-- Dependencies: 1555
-- Name: contasPagar_codContaPagar_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: alcivando
--

ALTER SEQUENCE "contasPagar_codContaPagar_seq" OWNED BY "contasPagar"."codContaPagar";


--
-- TOC entry 1887 (class 0 OID 0)
-- Dependencies: 1555
-- Name: contasPagar_codContaPagar_seq; Type: SEQUENCE SET; Schema: public; Owner: alcivando
--

SELECT pg_catalog.setval('"contasPagar_codContaPagar_seq"', 1, false);


--
-- TOC entry 1554 (class 1259 OID 16863)
-- Dependencies: 3
-- Name: contasReceber; Type: TABLE; Schema: public; Owner: alcivando; Tablespace: 
--

CREATE TABLE "contasReceber" (
);


ALTER TABLE public."contasReceber" OWNER TO alcivando;

--
-- TOC entry 1547 (class 1259 OID 16745)
-- Dependencies: 3
-- Name: estoque; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE estoque (
    "codItem" integer NOT NULL,
    "dataEntrada" date,
    "nomeProduto" text,
    "nomeFornecedor" text,
    quantidade integer,
    "qtdMinima" integer
);


ALTER TABLE public.estoque OWNER TO root;

--
-- TOC entry 1546 (class 1259 OID 16743)
-- Dependencies: 3 1547
-- Name: estoque_codItem_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "estoque_codItem_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."estoque_codItem_seq" OWNER TO root;

--
-- TOC entry 1888 (class 0 OID 0)
-- Dependencies: 1546
-- Name: estoque_codItem_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "estoque_codItem_seq" OWNED BY estoque."codItem";


--
-- TOC entry 1889 (class 0 OID 0)
-- Dependencies: 1546
-- Name: estoque_codItem_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"estoque_codItem_seq"', 1, false);


--
-- TOC entry 1539 (class 1259 OID 16620)
-- Dependencies: 3
-- Name: fornecedor; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE fornecedor (
    "codFornecedor" integer NOT NULL,
    representante text,
    "foneRepresentante" text,
    "nomeEmpresa" text,
    "nomeReal" text,
    "foneEmpresa" text,
    rua text,
    numero integer,
    bairro text,
    cidade text,
    uf text
);


ALTER TABLE public.fornecedor OWNER TO root;

--
-- TOC entry 1538 (class 1259 OID 16618)
-- Dependencies: 3 1539
-- Name: fornecedor_codFornecedor_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "fornecedor_codFornecedor_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."fornecedor_codFornecedor_seq" OWNER TO root;

--
-- TOC entry 1890 (class 0 OID 0)
-- Dependencies: 1538
-- Name: fornecedor_codFornecedor_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "fornecedor_codFornecedor_seq" OWNED BY fornecedor."codFornecedor";


--
-- TOC entry 1891 (class 0 OID 0)
-- Dependencies: 1538
-- Name: fornecedor_codFornecedor_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"fornecedor_codFornecedor_seq"', 1, false);


--
-- TOC entry 1537 (class 1259 OID 16609)
-- Dependencies: 3
-- Name: funcionario; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE funcionario (
    codfuncionario integer NOT NULL,
    nome text,
    rua text,
    numero text,
    bairro text,
    cidade text,
    salario double precision,
    cpf text,
    telefone text,
    observacoes text,
    uf text,
    complemento text,
    cep text
);


ALTER TABLE public.funcionario OWNER TO root;

--
-- TOC entry 1535 (class 1259 OID 16604)
-- Dependencies: 3
-- Name: funcionario_cod_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE funcionario_cod_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.funcionario_cod_seq OWNER TO root;

--
-- TOC entry 1892 (class 0 OID 0)
-- Dependencies: 1535
-- Name: funcionario_cod_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('funcionario_cod_seq', 1, false);


--
-- TOC entry 1536 (class 1259 OID 16607)
-- Dependencies: 3 1537
-- Name: funcionario_codfuncionario_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE funcionario_codfuncionario_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.funcionario_codfuncionario_seq OWNER TO root;

--
-- TOC entry 1893 (class 0 OID 0)
-- Dependencies: 1536
-- Name: funcionario_codfuncionario_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE funcionario_codfuncionario_seq OWNED BY funcionario.codfuncionario;


--
-- TOC entry 1894 (class 0 OID 0)
-- Dependencies: 1536
-- Name: funcionario_codfuncionario_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('funcionario_codfuncionario_seq', 3, true);


--
-- TOC entry 1551 (class 1259 OID 16854)
-- Dependencies: 3
-- Name: itensCompra; Type: TABLE; Schema: public; Owner: alcivando; Tablespace: 
--

CREATE TABLE "itensCompra" (
    "idCompra" integer,
    "idProduto" integer,
    "idFornecedor" integer
);


ALTER TABLE public."itensCompra" OWNER TO alcivando;

--
-- TOC entry 1552 (class 1259 OID 16857)
-- Dependencies: 3
-- Name: itensVenda; Type: TABLE; Schema: public; Owner: alcivando; Tablespace: 
--

CREATE TABLE "itensVenda" (
    "codVenda" integer,
    "codItem" integer
);


ALTER TABLE public."itensVenda" OWNER TO alcivando;

--
-- TOC entry 1533 (class 1259 OID 16583)
-- Dependencies: 3
-- Name: login; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE login (
    cod integer NOT NULL,
    "nomeLogin" text,
    senha text,
    "codFuncionario" integer
);


ALTER TABLE public.login OWNER TO root;

--
-- TOC entry 1541 (class 1259 OID 16632)
-- Dependencies: 3
-- Name: pedido; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE pedido (
    "codPedido" integer NOT NULL,
    "codFornecedor" integer,
    "codCompra" integer,
    data date
);


ALTER TABLE public.pedido OWNER TO root;

--
-- TOC entry 1540 (class 1259 OID 16630)
-- Dependencies: 1541 3
-- Name: pedido_codPedido_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "pedido_codPedido_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."pedido_codPedido_seq" OWNER TO root;

--
-- TOC entry 1895 (class 0 OID 0)
-- Dependencies: 1540
-- Name: pedido_codPedido_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "pedido_codPedido_seq" OWNED BY pedido."codPedido";


--
-- TOC entry 1896 (class 0 OID 0)
-- Dependencies: 1540
-- Name: pedido_codPedido_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"pedido_codPedido_seq"', 1, false);


--
-- TOC entry 1545 (class 1259 OID 16729)
-- Dependencies: 3
-- Name: produto; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE produto (
    "codProduto" integer NOT NULL,
    nome text,
    preco double precision,
    marca text,
    "estoqueMin" integer,
    tamanho text,
    "codFornecedor" integer
);


ALTER TABLE public.produto OWNER TO root;

--
-- TOC entry 1544 (class 1259 OID 16727)
-- Dependencies: 3 1545
-- Name: produto_codProduto_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE "produto_codProduto_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public."produto_codProduto_seq" OWNER TO root;

--
-- TOC entry 1897 (class 0 OID 0)
-- Dependencies: 1544
-- Name: produto_codProduto_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE "produto_codProduto_seq" OWNED BY produto."codProduto";


--
-- TOC entry 1898 (class 0 OID 0)
-- Dependencies: 1544
-- Name: produto_codProduto_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('"produto_codProduto_seq"', 1, false);


--
-- TOC entry 1534 (class 1259 OID 16589)
-- Dependencies: 3 1533
-- Name: tabela_cod_seq; Type: SEQUENCE; Schema: public; Owner: root
--

CREATE SEQUENCE tabela_cod_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.tabela_cod_seq OWNER TO root;

--
-- TOC entry 1899 (class 0 OID 0)
-- Dependencies: 1534
-- Name: tabela_cod_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: root
--

ALTER SEQUENCE tabela_cod_seq OWNED BY login.cod;


--
-- TOC entry 1900 (class 0 OID 0)
-- Dependencies: 1534
-- Name: tabela_cod_seq; Type: SEQUENCE SET; Schema: public; Owner: root
--

SELECT pg_catalog.setval('tabela_cod_seq', 13, true);


--
-- TOC entry 1548 (class 1259 OID 16761)
-- Dependencies: 3
-- Name: vendas; Type: TABLE; Schema: public; Owner: root; Tablespace: 
--

CREATE TABLE vendas (
    "codVenda" integer NOT NULL,
    "codCliente" integer,
    "tipoPagamento" text,
    data text,
    total double precision
);


ALTER TABLE public.vendas OWNER TO root;

--
-- TOC entry 1840 (class 2604 OID 16785)
-- Dependencies: 1550 1549 1550
-- Name: codCliente; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE clientes ALTER COLUMN "codCliente" SET DEFAULT nextval('"clientes_codCliente_seq"'::regclass);


--
-- TOC entry 1837 (class 2604 OID 16714)
-- Dependencies: 1543 1542 1543
-- Name: codCompra; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE compras ALTER COLUMN "codCompra" SET DEFAULT nextval('"compras_codCompra_seq"'::regclass);


--
-- TOC entry 1841 (class 2604 OID 16868)
-- Dependencies: 1555 1553
-- Name: codContaPagar; Type: DEFAULT; Schema: public; Owner: alcivando
--

ALTER TABLE "contasPagar" ALTER COLUMN "codContaPagar" SET DEFAULT nextval('"contasPagar_codContaPagar_seq"'::regclass);


--
-- TOC entry 1839 (class 2604 OID 16748)
-- Dependencies: 1546 1547 1547
-- Name: codItem; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE estoque ALTER COLUMN "codItem" SET DEFAULT nextval('"estoque_codItem_seq"'::regclass);


--
-- TOC entry 1835 (class 2604 OID 16623)
-- Dependencies: 1539 1538 1539
-- Name: codFornecedor; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE fornecedor ALTER COLUMN "codFornecedor" SET DEFAULT nextval('"fornecedor_codFornecedor_seq"'::regclass);


--
-- TOC entry 1834 (class 2604 OID 16612)
-- Dependencies: 1536 1537 1537
-- Name: codfuncionario; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE funcionario ALTER COLUMN codfuncionario SET DEFAULT nextval('funcionario_codfuncionario_seq'::regclass);


--
-- TOC entry 1833 (class 2604 OID 16594)
-- Dependencies: 1534 1533
-- Name: cod; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE login ALTER COLUMN cod SET DEFAULT nextval('tabela_cod_seq'::regclass);


--
-- TOC entry 1836 (class 2604 OID 16635)
-- Dependencies: 1541 1540 1541
-- Name: codPedido; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE pedido ALTER COLUMN "codPedido" SET DEFAULT nextval('"pedido_codPedido_seq"'::regclass);


--
-- TOC entry 1838 (class 2604 OID 16732)
-- Dependencies: 1545 1544 1545
-- Name: codProduto; Type: DEFAULT; Schema: public; Owner: root
--

ALTER TABLE produto ALTER COLUMN "codProduto" SET DEFAULT nextval('"produto_codProduto_seq"'::regclass);


--
-- TOC entry 1872 (class 0 OID 16782)
-- Dependencies: 1550
-- Data for Name: clientes; Type: TABLE DATA; Schema: public; Owner: root
--

COPY clientes ("codCliente", nome, cpf, tamanho, rua, numero, bairro, cidade, telefone, aniversario, observacoes, "UF", complemento, "valorConta", cep) FROM stdin;
2	Bruno	057.413.510-99	GG	Maria da Penha	12	Favela Zé Mendes	Tabuleiro do Norte	(88) 9239-3189	12/08	Cara legal....\na vá é mermo.	CE	barraco	0	62960-000
5	Taline	057.520.230-93	GG	Rua Pedro José de Alencar	114	Zé mendes	Tabuleiro do Norte	(88) 9239-3189	29/03		CE	casa	0	62960-000
6	ricardo	038.409.328-48	PP	St Cuberto	12	asdfa	Tabuleiro do Norte	(88) 9678-7876	04/04	aluno do 3º INFO	CE	casa	0	62960-000
7	Bruno	034.343.434-34	P 	Maria da Penha	112	centro	tabuleiro do norte	(88) 9234-3234	19/08	sfdgsdf	CE	perto do presidio	0	62960-000
8	asdasd	121.323.123-12	AS	DSFADSFASD	12	SDFASD	ADFADF	(12) 3123-1231	23/08		CE	DFASDFA	0	12341-324
9	Renato	123.123.123-12	GG	hsfgh	234	favela	tabu	(12) 3123-1231	23/08		CE	barraco	0	42534-523
10	mardone	123.123.123-12	GG	asdfads	123	sdfasd	asdfa	(12) 1212-1221	24/08	prof. de estagio	CE	fasdfasdf	0	12341-232
11	sadasdas	324.213.412-34	  		12			(88) 9898-9898	04/04		AC		0	62960-000
12		   .   .   -  	  		1			(  )     -    	  /  		AC		0	     -   
\.


--
-- TOC entry 1868 (class 0 OID 16711)
-- Dependencies: 1543
-- Data for Name: compras; Type: TABLE DATA; Schema: public; Owner: root
--

COPY compras ("codCompra", "codFuncionario", data, total, "tipoPagamento") FROM stdin;
3	1	30/08/2010	12	\N
4	1	31/08/2010	12	Á vista
5	1	31/08/2010	12	Á vista
\.


--
-- TOC entry 1875 (class 0 OID 16860)
-- Dependencies: 1553
-- Data for Name: contasPagar; Type: TABLE DATA; Schema: public; Owner: alcivando
--

COPY "contasPagar" ("codContaPagar", "codCompra") FROM stdin;
\.


--
-- TOC entry 1876 (class 0 OID 16863)
-- Dependencies: 1554
-- Data for Name: contasReceber; Type: TABLE DATA; Schema: public; Owner: alcivando
--

COPY "contasReceber"  FROM stdin;
\.


--
-- TOC entry 1870 (class 0 OID 16745)
-- Dependencies: 1547
-- Data for Name: estoque; Type: TABLE DATA; Schema: public; Owner: root
--

COPY estoque ("codItem", "dataEntrada", "nomeProduto", "nomeFornecedor", quantidade, "qtdMinima") FROM stdin;
\.


--
-- TOC entry 1866 (class 0 OID 16620)
-- Dependencies: 1539
-- Data for Name: fornecedor; Type: TABLE DATA; Schema: public; Owner: root
--

COPY fornecedor ("codFornecedor", representante, "foneRepresentante", "nomeEmpresa", "nomeReal", "foneEmpresa", rua, numero, bairro, cidade, uf) FROM stdin;
1	taline	(23) 4123-4123	asdasd	dASD	(88) 9239-3189	sadfasdfas	12	qwedq	asdfa	CE
2	Taline	(88) 9233-4322	Tah' Line	T. I. Confecções	(88) 9237-4924	Rua Barão de Catelania	666	centro	Cariri	CE
\.


--
-- TOC entry 1865 (class 0 OID 16609)
-- Dependencies: 1537
-- Data for Name: funcionario; Type: TABLE DATA; Schema: public; Owner: root
--

COPY funcionario (codfuncionario, nome, rua, numero, bairro, cidade, salario, cpf, telefone, observacoes, uf, complemento, cep) FROM stdin;
1	taline	hercilio pinherio	420	centro	Tabuleiro do Norte	230	\N	\N	\N	\N	\N	\N
2	Valcilânia Maia de Souza	dsfasdfasda	12	dfasdf	asdfasf	250	745.674.567-45	(88) 9856-7848	dsfasdgafdsgadfgad	CE	dsfadsfas	12341-234
\.


--
-- TOC entry 1873 (class 0 OID 16854)
-- Dependencies: 1551
-- Data for Name: itensCompra; Type: TABLE DATA; Schema: public; Owner: alcivando
--

COPY "itensCompra" ("idCompra", "idProduto", "idFornecedor") FROM stdin;
3	4	\N
4	4	\N
5	4	\N
\.


--
-- TOC entry 1874 (class 0 OID 16857)
-- Dependencies: 1552
-- Data for Name: itensVenda; Type: TABLE DATA; Schema: public; Owner: alcivando
--

COPY "itensVenda" ("codVenda", "codItem") FROM stdin;
\.


--
-- TOC entry 1864 (class 0 OID 16583)
-- Dependencies: 1533
-- Data for Name: login; Type: TABLE DATA; Schema: public; Owner: root
--

COPY login (cod, "nomeLogin", senha, "codFuncionario") FROM stdin;
1	alcivando	123	1
2	bruno	123	2
\.


--
-- TOC entry 1867 (class 0 OID 16632)
-- Dependencies: 1541
-- Data for Name: pedido; Type: TABLE DATA; Schema: public; Owner: root
--

COPY pedido ("codPedido", "codFornecedor", "codCompra", data) FROM stdin;
\.


--
-- TOC entry 1869 (class 0 OID 16729)
-- Dependencies: 1545
-- Data for Name: produto; Type: TABLE DATA; Schema: public; Owner: root
--

COPY produto ("codProduto", nome, preco, marca, "estoqueMin", tamanho, "codFornecedor") FROM stdin;
1	CAMISA	15	\N	\N	\N	\N
2	Camisa Polo	100	\N	\N	\N	\N
3	Camisa Rotulo do Corpo	60	\N	\N	\N	\N
4	calça	12	\N	\N	\N	\N
\.


--
-- TOC entry 1871 (class 0 OID 16761)
-- Dependencies: 1548
-- Data for Name: vendas; Type: TABLE DATA; Schema: public; Owner: root
--

COPY vendas ("codVenda", "codCliente", "tipoPagamento", data, total) FROM stdin;
\.


--
-- TOC entry 1843 (class 2606 OID 16593)
-- Dependencies: 1533 1533
-- Name: pk_cod; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY login
    ADD CONSTRAINT pk_cod PRIMARY KEY (cod);


--
-- TOC entry 1859 (class 2606 OID 16790)
-- Dependencies: 1550 1550
-- Name: pk_codCliente; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY clientes
    ADD CONSTRAINT "pk_codCliente" PRIMARY KEY ("codCliente");


--
-- TOC entry 1851 (class 2606 OID 16716)
-- Dependencies: 1543 1543
-- Name: pk_codCompra; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY compras
    ADD CONSTRAINT "pk_codCompra" PRIMARY KEY ("codCompra");


--
-- TOC entry 1861 (class 2606 OID 16873)
-- Dependencies: 1553 1553
-- Name: pk_codContaPagar; Type: CONSTRAINT; Schema: public; Owner: alcivando; Tablespace: 
--

ALTER TABLE ONLY "contasPagar"
    ADD CONSTRAINT "pk_codContaPagar" PRIMARY KEY ("codContaPagar");


--
-- TOC entry 1847 (class 2606 OID 16628)
-- Dependencies: 1539 1539
-- Name: pk_codFuncionario; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY fornecedor
    ADD CONSTRAINT "pk_codFuncionario" PRIMARY KEY ("codFornecedor");


--
-- TOC entry 1855 (class 2606 OID 16750)
-- Dependencies: 1547 1547
-- Name: pk_codItem; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY estoque
    ADD CONSTRAINT "pk_codItem" PRIMARY KEY ("codItem");


--
-- TOC entry 1849 (class 2606 OID 16637)
-- Dependencies: 1541 1541
-- Name: pk_codPedido; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY pedido
    ADD CONSTRAINT "pk_codPedido" PRIMARY KEY ("codPedido");


--
-- TOC entry 1853 (class 2606 OID 16737)
-- Dependencies: 1545 1545
-- Name: pk_codProduto; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY produto
    ADD CONSTRAINT "pk_codProduto" PRIMARY KEY ("codProduto");


--
-- TOC entry 1857 (class 2606 OID 16768)
-- Dependencies: 1548 1548
-- Name: pk_codVenda; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY vendas
    ADD CONSTRAINT "pk_codVenda" PRIMARY KEY ("codVenda");


--
-- TOC entry 1845 (class 2606 OID 16617)
-- Dependencies: 1537 1537
-- Name: pk_codfuncionario; Type: CONSTRAINT; Schema: public; Owner: root; Tablespace: 
--

ALTER TABLE ONLY funcionario
    ADD CONSTRAINT pk_codfuncionario PRIMARY KEY (codfuncionario);


--
-- TOC entry 1862 (class 2606 OID 16638)
-- Dependencies: 1541 1846 1539
-- Name: codFornecedor; Type: FK CONSTRAINT; Schema: public; Owner: root
--

ALTER TABLE ONLY pedido
    ADD CONSTRAINT "codFornecedor" FOREIGN KEY ("codFornecedor") REFERENCES fornecedor("codFornecedor");


--
-- TOC entry 1863 (class 2606 OID 16874)
-- Dependencies: 1553 1850 1543
-- Name: fk_codCompra; Type: FK CONSTRAINT; Schema: public; Owner: alcivando
--

ALTER TABLE ONLY "contasPagar"
    ADD CONSTRAINT "fk_codCompra" FOREIGN KEY ("codCompra") REFERENCES compras("codCompra");


--
-- TOC entry 1881 (class 0 OID 0)
-- Dependencies: 3
-- Name: public; Type: ACL; Schema: -; Owner: root
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM root;
GRANT ALL ON SCHEMA public TO root;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2010-09-01 10:58:43

--
-- PostgreSQL database dump complete
--

